<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta name="renderer" content="webkit|ie-comp|ie-stand">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta http-equiv="Cache-Control" content="no-siteapp" />
    <link href="assets/css/bootstrap.min.css" rel="stylesheet" />
    <link rel="stylesheet" href="css/style.css"/>
    <link href="assets/css/codemirror.css" rel="stylesheet">
    <link rel="stylesheet" href="assets/css/ace.min.css" />
    <link rel="stylesheet" href="font/css/font-awesome.min.css" />
    <link rel="stylesheet" href="assets/css/font-awesome.min.css" />
    <!--[if lte IE 8]>
    <link rel="stylesheet" href="assets/css/ace-ie.min.css" />
    <![endif]-->
    <script src="js/jquery-1.9.1.min.js"></script>
    <script src="assets/js/bootstrap.min.js"></script>
    <script type="text/javascript" src="Widget/Validform/5.3.2/Validform.min.js"></script>
    <script src="assets/js/typeahead-bs2.min.js"></script>
    <script src="assets/js/jquery.dataTables.min.js"></script>
    <script src="assets/js/jquery.dataTables.bootstrap.js"></script>
    <script src="assets/layer/layer.js" type="text/javascript" ></script>
    <script src="js/lrtk.js" type="text/javascript" ></script>
    <script src="assets/layer/layer.js" type="text/javascript"></script>
    <script src="assets/laydate/laydate.js" type="text/javascript"></script>
    <style>
        #sample-table_filter {
            display: none !important;
        }
    </style>
    <title>扫描枪设置</title>
</head>

<body>
<div class="page-content clearfix">
    <div class="administrator">
        <div class="d_Confirm_Order_style">
            <div class="search_style">
                <ul class="search_content clearfix">
                    <li>
                        <label class="l_f">扫描枪名称：</label>
                        <input name="" type="text"  class="text_add" placeholder=""  style=" width:150px"/>
                    </li>
                    <li>
                        <label class="l_f">状态：</label>
                        <select class="select" name="admin-role" size="1" style=" height:30px">
                            <option value="0">闲置</option>
                            <option value="1">使用中</option>
                        </select>
                    </li>
                    <li>
                        <label class="l_f">时间</label>
                        <input class="inline laydate-icon" id="start" style=" margin-left:10px;">
                        至
                        <input class="inline laydate-icon" id="end" style=" margin-left:10px;">
                    </li>
                    <li style="width:90px;">
                        <button type="button" class="btn_search"><i class="fa fa-search"></i>查询</button>
                    </li>
                </ul>
            </div>
            <!--操作-->
            <div class="border clearfix"> <span class="l_f">
        <!-- <a href="javascript:ovid()" id="administrator_add" class="btn btn-warning"><i class="fa fa-plus"></i> 添加角色</a>--> 
        <a  onclick="adddriver1()" id="Competence_add" class="btn btn-warning" title="添加扫描枪"><i class="fa fa-plus"></i> 添加扫描枪</a> <a href="javascript:ovid()" class="btn btn-danger"><i class="fa fa-trash"></i> 批量删除</a> </span> <span class="r_f">共：<b>3</b>条</span> </div>
            <div class="table_menu_list"  id="testIframe">
                <table class="table table-striped table-bordered table-hover" id="sample-table">
                    <thead>
                    <tr>
                        <th width="25px"><label>
                            <input type="checkbox" class="ace">
                            <span class="lbl"></span></label></th>
                        <th width="70px">序号</th>
                        <th width="100px">扫描枪名称</th>
                        <th width="80px">扫描枪光源</th>
                        <th width="140px">扫描枪码制</th>
                        <th width="80px">扫描枪传输方式</th>
                        <th width="80px">扫描枪扫描方式</th>
                        <th width="80px">分辨率</th>
                        <th width="100px">一次识别率</th>
                        <th width="100px">误码率</th>
                        <th width="100px">使用接口</th>
                        <th width="100px">状态</th>
                        <th width="100px">使用人</th>
                        <th width="170px">操作</th>
                    </tr>
                    </thead>
                    <tbody>
                    <tr>
                        <td><label>
                            <input type="checkbox" class="ace">
                            <span class="lbl"></span></label></td>
                        <td>1</td>
                        <td>扫描枪</td>
                        <td>激光</td>
                        <td>一维</td>
                        <td>有线</td>
                        <td>手持式</td>
                        <td>5mil</td>
                        <td>50%</td>
                        <td>13%</td>
                        <td>USB</td>
                        <td class="td-status"><span class="label label-success radius">使用中</span></td>
                        <td>张三</td>
                        <td class="td-manage">
                            <a onClick="member_stop(this,'10001')"  href="javascript:;" title="闲置"  class="btn btn-xs btn-success"><i class="fa fa-check  bigger-120"></i></a>
                            <a title="编辑" onclick="adddriver()"   class="btn btn-xs btn-info" ><i class="fa fa-edit bigger-120"></i></a>
                            <a title="删除" href="javascript:;"  onclick="member_del(this,'1')" class="btn btn-xs btn-danger" ><i class="fa fa-trash  bigger-120"></i></a>
                        </td>
                    </tr>
                    <tr>
                        <td><label>
                            <input type="checkbox" class="ace">
                            <span class="lbl"></span></label></td>
                        <td>2</td>
                        <td>扫描枪</td>
                        <td>激光</td>
                        <td>一维</td>
                        <td>有线</td>
                        <td>手持式</td>
                        <td>5mil</td>
                        <td>50%</td>
                        <td>13%</td>
                        <td>USB</td>
                        <td class="td-status"><span class="label label-success radius">使用中</span></td>
                        <td>张三</td>
                        <td class="td-manage">
                            <a onClick="member_stop(this,'10001')"  href="javascript:;" title="闲置"  class="btn btn-xs btn-success"><i class="fa fa-check  bigger-120"></i></a>
                            <a title="编辑" onclick="adddriver()"   class="btn btn-xs btn-info" ><i class="fa fa-edit bigger-120"></i></a>
                            <a title="删除" href="javascript:;"  onclick="member_del(this,'1')" class="btn btn-xs btn-danger" ><i class="fa fa-trash  bigger-120"></i></a>
                        </td>
                    </tr>
                    <tr>
                        <td><label>
                            <input type="checkbox" class="ace">
                            <span class="lbl"></span></label></td>
                        <td>3</td>
                        <td>扫描枪</td>
                        <td>激光</td>
                        <td>一维</td>
                        <td>有线</td>
                        <td>手持式</td>
                        <td>5mil</td>
                        <td>50%</td>
                        <td>13%</td>
                        <td>USB</td>
                        <td class="td-status"><span class="label label-success radius">使用中</span></td>
                        <td>张三</td>
                        <td class="td-manage">
                            <a onClick="member_stop(this,'10001')"  href="javascript:;" title="闲置"  class="btn btn-xs btn-success"><i class="fa fa-check  bigger-120"></i></a>
                            <a title="编辑" onclick="adddriver()"   class="btn btn-xs btn-info" ><i class="fa fa-edit bigger-120"></i></a>
                            <a title="删除" href="javascript:;"  onclick="member_del(this,'1')" class="btn btn-xs btn-danger" ><i class="fa fa-trash  bigger-120"></i></a>
                        </td>
                    </tr>
                    </tbody>
                </table>
            </div>
        </div>
    </div>
</div>
<!--添加管理员-->
<div id="add_administrator_style" class="add_menber" style="display:none"  >
    <form action=""  id="form-admin-add">
        <div class="form-group">
            <label class="form-label" >扫描枪名称：</label>
            <div class="formControls">
                扫描枪
            </div>
            <div class="col-4"> <span class="Validform_checktip"></span></div>
        </div>
        <div class="form-group">
            <label class="form-label" >扫描枪光源：</label>
            <div class="formControls">
                <!--<select class="select" name="admin-role" size="1" style=" height:30px">-->
                    <!--<option value="0">-->
                        激光
                    <!--</option>-->
                    <!--<option value="1">红光</option>-->
                <!--</select>-->
            </div>
            <div class="col-4"> <span class="Validform_checktip"></span></div>
        </div>
        <div class="form-group">
            <label class="form-label" >扫描枪码制：</label>
            <div class="formControls">
                <!--<select class="select" name="admin-role" size="1" style=" height:30px">-->
                    <!--<option value="0">-->
                        一维扫描枪
                    <!--</option>-->
                    <!--<option value="1">二维扫描枪</option>-->
                <!--</select>-->
            </div>
            <div class="col-4"> <span class="Validform_checktip"></span></div>
        </div>
        <div class="form-group">
            <label class="form-label" >扫描枪传输方式：</label>
            <div class="formControls">
                <select class="select" name="admin-role" size="1" style=" height:30px">
                    <option value="0">有线</option>
                    <option value="1">无线</option>
                </select>
            </div>
            <div class="col-4"> <span class="Validform_checktip"></span></div>
        </div>
        <div class="form-group">
            <label class="form-label" >扫描枪扫描方式：</label>
            <div class="formControls">
                <!--<select class="select" name="admin-role" size="1" style=" height:30px">-->
                    <!--<option value="0">-->
                        手持式
                    <!--</option>-->
                    <!--<option value="1">平台式</option>-->
                <!--</select>-->
            </div>
            <div class="col-4"> <span class="Validform_checktip"></span></div>
        </div>
        <div class="form-group">
            <label class="form-label" >分辨率：</label>
            <div class="formControls">
                <select class="select" name="admin-role" size="1" style=" height:30px">
                    <option value="0">5mil</option>
                    <option value="1">4mil</option>
                    <option value="2">3mil</option>
                </select>
            </div>
            <div class="col-4"> <span class="Validform_checktip"></span></div>
        </div>
        <div class="form-group">
            <label class="form-label" >一次识别率：</label>
            <div class="formControls">
                50%
            </div>
            <div class="col-4"> <span class="Validform_checktip"></span></div>
        </div>
        <div class="form-group">
            <label class="form-label" >误码率：</label>
            <div class="formControls">
               13%
            </div>
            <div class="col-4"> <span class="Validform_checktip"></span></div>
        </div>
        <div class="form-group">
            <label class="form-label" >使用接口：</label>
            <div class="formControls">
                USB
            </div>
            <div class="col-4"> <span class="Validform_checktip"></span></div>
        </div>
        <div class="form-group">
            <label class="form-label" >状态：</label>
            <div class="formControls">
               使用中
            </div>
            <div class="col-4"> <span class="Validform_checktip"></span></div>
        </div>
        <div class="form-group">
            <label class="form-label" >使用人：</label>
            <div class="formControls">
                <input type="text" class="input-text" value="" placeholder="张三" id="user-xnamew" name="user-name" datatype="*2-16" nullmsg="不能为空">
            </div>
            <div class="col-4"> <span class="Validform_checktip"></span></div>
        </div>
        <div class="form-group">
            <label class="form-label" >使用期限：</label>
            <div class="formControls">
                <input type="text" style="width: 88px" class="input-text" id="start2" value="" placeholder="2016-12-15"  name="设置显示期限">到
                <input type="text" style="width: 88px;margin-left: 0;"  class="input-text" id="end2" value="" placeholder="2017-01-01" name="设置显示期限"></td>
            </div>
            <div class="col-4"> <span class="Validform_checktip"></span></div>
        </div>
    </form>
</div>
<div id="add_administrator_style1" class="add_menber" style="display:none"  >
    <form action=""  id="form-admin-add">
        <div class="form-group">
            <label class="form-label" >扫描枪名称：</label>
            <div class="formControls">
                <input type="text" class="input-text" value="" placeholder="" name="user-name">
            </div>
            <div class="col-4"> <span class="Validform_checktip"></span></div>
        </div>
        <div class="form-group">
            <label class="form-label" >扫描枪光源：</label>
            <div class="formControls">
                <select class="select" name="admin-role" size="1" style=" height:30px;margin-left: 10px;">
                    <option value="0">
                        激光
                    </option>
                    <option value="1">红光</option>
                </select>
            </div>
            <div class="col-4"> <span class="Validform_checktip"></span></div>
        </div>
        <div class="form-group">
            <label class="form-label" >扫描枪码制：</label>
            <div class="formControls">
                <select class="select" name="admin-role" size="1" style=" height:30px ;margin-left: 10px;">
                    <option value="0">
                        一维扫描枪
                    </option>
                    <option value="1">二维扫描枪</option>
                </select>
            </div>
            <div class="col-4"> <span class="Validform_checktip"></span></div>
        </div>
        <div class="form-group">
            <label class="form-label" >扫描枪传输方式：</label>
            <div class="formControls">
                <select class="select" name="admin-role" size="1" style=" height:30px;margin-left: 10px;">
                    <option value="0">有线</option>
                    <option value="1">无线</option>
                </select>
            </div>
            <div class="col-4"> <span class="Validform_checktip"></span></div>
        </div>
        <div class="form-group">
            <label class="form-label" >扫描枪扫描方式：</label>
            <div class="formControls">
                <select class="select" name="admin-role" size="1" style=" height:30px;margin-left: 10px;">
                    <option value="0">
                        手持式
                    </option>
                    <option value="1">平台式</option>
                </select>
            </div>
            <div class="col-4"> <span class="Validform_checktip"></span></div>
        </div>
        <div class="form-group">
            <label class="form-label" >分辨率：</label>
            <div class="formControls">
                <select class="select" name="admin-role" size="1" style=" height:30px;margin-left: 10px;">
                    <option value="0">5mil</option>
                    <option value="1">4mil</option>
                    <option value="2">3mil</option>
                </select>
            </div>
            <div class="col-4"> <span class="Validform_checktip"></span></div>
        </div>
        <div class="form-group">
            <label class="form-label" >一次识别率：</label>
            <div class="formControls">
                <input type="text" class="input-text" value="" placeholder="" id="user-namew" name="user-name" datatype="*0-3">
            </div>
            <div class="col-4"> <span class="Validform_checktip"></span></div>
        </div>
        <div class="form-group">
            <label class="form-label" >误码率：</label>
            <div class="formControls">
                <input type="text" class="input-text" value="" placeholder="" id="user-namew" name="user-name" datatype="*0-3">
            </div>
            <div class="col-4"> <span class="Validform_checktip"></span></div>
        </div>
        <div class="form-group">
            <label class="form-label" >使用接口：</label>
            <div class="formControls">
                <select class="select" onchange="change_type_gg(5,this.options[this.options.selectedIndex].value,this)"  name="admin-role" size="1" style=" height:30px;margin-left: 10px;">
                    <option value="0">USB（通用串行总线接口）</option>
                    <option value="1">EPP（增强型并行接口）</option>
                    <option value="2">SCSI（小型计算机标准接口）</option>
                    <option value="3">PS2 (键盘接口）</option>
                </select>
            </div>
            <div class="col-4"> <span class="Validform_checktip"></span></div>
        </div>
        <div class="form-group">
            <label class="form-label" >使用人：</label>
            <div class="formControls">
                <input type="text" class="input-text" value="" placeholder="张三" id="user-xnamew" name="user-name" datatype="*2-16" nullmsg="不能为空">
            </div>
            <div class="col-4"> <span class="Validform_checktip"></span></div>
        </div>
        <div class="form-group">
            <label class="form-label" >使用期限：</label>
            <div class="formControls">
                <input type="text" style="width: 88px" class="input-text" id="start3" value="" placeholder="2016-12-15"  name="设置显示期限">到
                <input type="text" style="width: 88px;margin-left: 0;"  class="input-text" id="end3" value="" placeholder="2017-01-01" name="设置显示期限"></td>
            </div>
            <div class="col-4"> <span class="Validform_checktip"></span></div>
        </div>
    </form>
</div>
</body>
</html>
<script type="text/javascript">
    jQuery(function($) {
        var oTable1 = $('#sample-table').dataTable({
//            "aaSorting": [[1, "desc"]],//默认第几个排序
            "bStateSave": false,//状态保存
            "aoColumnDefs": [
                //{"bVisible": false, "aTargets": [ 3 ]} //控制列的隐藏显示
                {"orderable": false, "aTargets": [0, 2, 4, 5, 6, 8, 9]}// 制定列不参与排序
            ]
        });
        $('table th input:checkbox').on('click' , function(){
            var that = this;
            $(this).closest('table').find('tr > td:first-child input:checkbox')
                    .each(function(){
                        this.checked = that.checked;
                        $(this).closest('tr').toggleClass('selected');
                    });

        });


        $('[data-rel="tooltip"]').tooltip({placement: tooltip_placement});
        function tooltip_placement(context, source) {
            var $source = $(source);
            var $parent = $source.closest('table')
            var off1 = $parent.offset();
            var w1 = $parent.width();

            var off2 = $source.offset();
            var w2 = $source.width();

            if( parseInt(off2.left) < parseInt(off1.left) + parseInt(w1 / 2) ) return 'right';
            return 'left';
        }
    });

</script>
<script type="text/javascript">
    $(function() {
        $("#administrator").fix({
            float : 'left',
            //minStatue : true,
            skin : 'green',
            durationTime :false,
            spacingw:50,//设置隐藏时的距离
            spacingh:270,//设置显示时间距
        });
    });
    //字数限制
    function checkLength(which) {
        var maxChars = 100; //
        if(which.value.length > maxChars){
            layer.open({
                icon:2,
                title:'提示框',
                content:'您输入的字数超过限制!',
            });
            // 超过限制的字数了就将 文本框中的内容按规定的字数 截取
            which.value = which.value.substring(0,maxChars);
            return false;
        }else{
            var curr = maxChars - which.value.length; //250 减去 当前输入的
            document.getElementById("sy").innerHTML = curr.toString();
            return true;
        }
    };
    //初始化宽度、高度
    $(".widget-box").height($(window).height()-215);
    $(".table_menu_list").width($(window).width()-60);
    $(".table_menu_list").height($(window).height()-215);
    //当文档窗口发生改变时 触发
    $(window).resize(function(){
        $(".widget-box").height($(window).height()-215);
        $(".table_menu_list").width($(window).width()-60);
        $(".table_menu_list").height($(window).height()-215);
    })
    laydate({
        elem: '#start',
        event: 'focus'
    });
    laydate({
        elem: '#end',
        event: 'focus'
    });laydate({
        elem: '#start2',
        event: 'focus'
    });
    laydate({
        elem: '#end2',
        event: 'focus'
    });laydate({
        elem: '#start3',
        event: 'focus'
    });
    laydate({
        elem: '#end3',
        event: 'focus'
    });

    /*用户-停用*/
    function member_stop(obj,id){
        layer.confirm('确认要停用吗？',function(index){
            $(obj).parents("tr").find(".td-manage").prepend('<a style="text-decoration:none" class="btn btn-xs " onClick="member_start(this,id)" href="javascript:;" title="启用"><i class="fa fa-close bigger-120"></i></a>');
            $(obj).parents("tr").find(".td-status").html('<span class="label label-defaunt radius">停用</span>');
            $(obj).remove();
            layer.msg('已停用!',{icon: 5,time:1000});
        });
    }
    /*用户-启用*/
    function member_start(obj,id){
        layer.confirm('确认要使用吗？',function(index){
            $(obj).parents("tr").find(".td-manage").prepend('<a style="text-decoration:none" class="btn btn-xs btn-success" onClick="member_stop(this,id)" href="javascript:;" title="停用"><i class="fa fa-check  bigger-120"></i></a>');
            $(obj).parents("tr").find(".td-status").html('<span class="label label-success radius">使用中</span>');
            $(obj).remove();
            layer.msg('已使用!',{icon: 6,time:1000});
        });
    }
    /*产品-编辑*/
    function member_edit(title,url,id,w,h){
        layer_show(title,url,w,h);
    }

    /*产品-删除*/
    function member_del(obj,id){
        layer.confirm('确认要删除吗？',function(index){
            $(obj).parents("tr").remove();
            layer.msg('已删除!',{icon:1,time:1000});
        });
    }

    function yuangong(){
        layer.open({
            type: 1,
            title:'设置',
            area: ['400px',''],
            shadeClose: false,
            content: $('#add_administrator_style'),

        });
    }
    /*添加管理员on(*/
    $('#administrator_add').on('click', function(){
        layer.open({
            type: 1,
            title:'设置',
            area: ['400px',''],
            shadeClose: false,
            content: $('#add_administrator_style'),

        });
    })
    function adddriver(){
        layer.open({
            type: 1,
            title:'编辑',
            area: ['700px','500px'],
            shadeClose: false,
            content: $('#add_administrator_style'),
            btn:['提交','取消'],
            yes:function(index){
                layer.close(index);
            }
        });
    }
    function adddriver1(){
        layer.open({
            type: 1,
            title:'添加',
            area: ['700px','500px'],
            shadeClose: false,
            content: $('#add_administrator_style1'),
            btn:['提交','取消'],
            yes:function(index){
                layer.close(index);
            }
        });
    }
    //表单验证提交
    /*$("#form-admin-add").Validform({

     // tiptype:2,

     callback:function(){
     //form[0].submit();
     layer.msg("设置成功", {icon: data.status,time: 1000}, function(){
     location.reload();//刷新页面
     });
     //if(data.status==1){
     ////////         layer.msg(data.info, {icon: data.status,time: 1000}, function(){
     //           location.reload();//刷新页面
     //         });
     //  }
     //   else{
     //       layer.msg(data.info, {icon: data.status,time: 3000});
     //   }
     //	var index =parent.$("#iframe").attr("src");
     //	parent.layer.close(index);
     //
     }


     });	*/

</script>